package com.chen.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class HelloController {
    @RequestMapping("/hello")
//    @ResponseBody
    public String getHello(Model model){
//     封装数据
        model.addAttribute("msg","世界多美好，请珍惜这美好的时刻");
        return "hello";
    }
}
